#include "Projectile.h"

Projectile::Projectile(Enemy* enemy, ParticleEmitter* part) : Generic()
{
    this->enemy = enemy;
    this->nFrags = 0;
    this->part = part;
    this->inactiveBody();
}

Projectile::~Projectile()
{
    //dtor
}

int Projectile::collide(Object& other)
{
    if(other.type() == 4) //inimigo
        {
            enemy->reset();
            printf("Nailed that fucker!");
            this->nFrags++;
            this->position(-10,-10,-10);
            //body->vel = (0,0,0);
            //this->visible() = false;
            this->part->visible() = false;
            this->inactiveBody();
        }

        this->inactiveBody();

        return 1;
}
